<!DOCTYPE html>
<html>
  <!-- [Previous head section with styles remains the same] -->
  <body style="background-color: #f6f6f6; font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; margin: 0; padding: 0; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">
    <span class="preheader" style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;">You've been invited to join an organization on Trieve!</span>
    <!-- [Table structure remains the same until main content] -->
    <td class="wrapper" style="font-family: sans-serif; font-size: 14px; vertical-align: top; box-sizing: border-box; padding: 20px;" valign="top">
      <table role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" width="100%">
        <tr>
          <td style="font-family: sans-serif; font-size: 14px; vertical-align: top; padding: 20px; background-color="#ffffff" " valign="top">
            <p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">
              Hello!
            </p>
            <p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">
              You've been invited to join on {{ org_name }} Trieve. Trieve is a powerful search and retrieval platform that helps teams collaborate and find information quickly.
            </p>
            {% if new_user %}
            <p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">
              To get started, click the button below to register and activate your account:
            </p>
            {% else %}
            <p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">
              To accept this invitation and join the organization, click the button below:
            </p>
            {% endif %}
            <table role="presentation" border="0" cellpadding="0" cellspacing="0" class="btn btn-primary" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; box-sizing: border-box; width: 100%;" width="100%">
              <tbody>
                <tr>
                  <td align="left" style="font-family: sans-serif; font-size: 14px; vertical-align: top; padding-bottom: 15px;" valign="top">
                    <table role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: auto;">
                      <tbody>
                        <tr>
                          <td style="font-family: sans-serif; font-size: 14px; vertical-align: top; border-radius: 5px; text-align: center; background-color: #d946ef;" valign="top" align="center">
                            <a href="{{ org_redirect_url }}" target="_blank" style="border: solid 1px #d946ef; border-radius: 5px; box-sizing: border-box; cursor: pointer; display: inline-block; font-size: 14px; font-weight: bold; margin: 0; padding: 12px 25px; text-decoration: none; text-transform: capitalize; background-color: #d946ef; border-color: #d946ef; color: #ffffff;">Accept Invitation →</a>
                          </td>
                        </tr>
                      </tbody>
                    </table>
                  </td>
                </tr>
              </tbody>
            </table>

            <p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">
              or if you prefer, click this link directly
            </p>

            <table role="presentation">
              <tbody>
                <tr>
                  <td align="left" style="font-family: sans-serif; font-size: 14px; vertical-align: top; padding-bottom: 15px;" valign="top">
                    <table role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: auto;">
                      <tbody>
                        <tr>
                          <td style="font-family: sans-serif; font-size: 14px; vertical-align: top; text-align: center;" valign="top" align="center">
                            <a href="{{ org_redirect_url }}" target="_blank"> {{ org_redirect_url }} </a>
                          </td>
                        </tr>
                      </tbody>
                    </table>
                  </td>
                </tr>
              </tbody>
            </table>

            <p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">
              If you have any questions about using Trieve, please don't hesitate to reach out to our support team.
            </p>
            <p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">
              Best regards,<br/>
              The Trieve Team
            </p>
            <hr style="border: 0; border-bottom: 1px solid #f6f6f6; margin: 20px 0;">
            <p style="font-family: sans-serif; font-size: 12px; font-weight: normal; margin: 0; margin-bottom: 15px; color: #999999;">
              This email is intended for {{ email }}. If you received this invitation in error or this email wasn't intended for you, please contact us at support@trieve.ai. Please do not forward this email as the invitation link is unique to your email address.
            </p>
          </td>
        </tr>
      </table>
    </td>
    <!-- [Footer structure remains the same] -->
  </body>
</html>

